<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>丧心病狂的压行 | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="很无聊。">
<meta property="og:type" content="article">
<meta property="og:title" content="丧心病狂的压行">
<meta property="og:url" content="http://example.com/2020/08/28/%E4%B8%A7%E5%BF%83%E7%97%85%E7%8B%82%E7%9A%84%E5%8E%8B%E8%A1%8C/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="很无聊。">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2020-08-28T06:54:10.990Z">
<meta property="article:modified_time" content="2023-07-19T11:50:32.390Z">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">

  
  
<meta name="generator" content="Hexo 6.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"><span class="fa fa-bars"></span></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
        
          <a class="nav-icon" href="/atom.xml" title="RSS Feed"><span class="fa fa-rss"></span></a>
        
        <a class="nav-icon nav-search-btn" title="Search"><span class="fa fa-search"></span></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://example.com"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-丧心病狂的压行" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2020/08/28/%E4%B8%A7%E5%BF%83%E7%97%85%E7%8B%82%E7%9A%84%E5%8E%8B%E8%A1%8C/" class="article-date">
  <time class="dt-published" datetime="2020-08-28T06:54:10.990Z" itemprop="datePublished">2020-08-28</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      丧心病狂的压行
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <p>很无聊。</p>
<p>只用两行AC<a target="_blank" rel="noopener" href="https://www.luogu.com.cn/problem/P3811">P3811</a></p>
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;cstdio&gt;</span></span></span><br><span class="line"><span class="type">long</span> <span class="type">long</span> n,p,i=<span class="number">2</span>,q[<span class="number">3000005</span>]=&#123;<span class="number">0</span>,<span class="number">1</span>&#125;;<span class="built_in">main</span>()&#123;<span class="built_in">scanf</span>(<span class="string">&quot;%d%d&quot;</span>,&amp;n,&amp;p),<span class="built_in">puts</span>(<span class="string">&quot;1&quot;</span>);<span class="keyword">while</span>(q[i]=(p-p/i)*q[p%i]%p,i&lt;=n)<span class="built_in">printf</span>(<span class="string">&quot;%d\n&quot;</span>,q[i++]);&#125;</span><br></pre></td></tr></table></figure>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2020/08/28/%E4%B8%A7%E5%BF%83%E7%97%85%E7%8B%82%E7%9A%84%E5%8E%8B%E8%A1%8C/" data-id="clk9o8ln300078wi580szdtod" data-title="丧心病狂的压行" class="article-share-link"><span class="fa fa-share">Share</span></a>
      
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2020/08/29/%20%E4%BF%A1%E5%A5%A5%E9%A2%98%E5%BA%93%EF%BC%88OI%E9%A2%98%E5%BA%93%EF%BC%898%E6%9C%88%E6%9C%88%E8%B5%9BT1%E9%A2%98%E8%A7%A3%20%E5%B9%82%E6%AC%A1%E6%95%B0/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          信奥题库（OI题库）8月月赛T1题解 幂次数
        
      </div>
    </a>
  
  
    <a href="/2020/08/28/%E6%A0%91%E9%93%BE%E5%89%96%E5%88%86%E8%AF%A6%E8%A7%A3%20AND%20%E9%A2%98%E8%A7%A3%20P6098%20%E3%80%90%5BUSACO19FEB%5DCow%20Land%20G%E3%80%91/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">树链剖分详解 AND 题解 P6098 【[USACO19FEB]Cow Land G】</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/07/">July 2023</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/10/">October 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/05/">May 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/02/">February 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/01/">January 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/08/">August 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/">July 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/06/">June 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/08/">August 2020</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2023/07/17/%E5%86%B3%E7%AD%96%E5%8D%95%E8%B0%83%E6%80%A7%E4%BC%98%E5%8C%96DP%20%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%20AND%20P4767%20%E3%80%8CIOI2000%E3%80%8D%20%E9%82%AE%E5%B1%80%20%E9%A2%98%E8%A7%A3/">决策单调性优化DP 学习笔记 AND P4767 「IOI2000」 邮局 题解</a>
          </li>
        
          <li>
            <a href="/2022/10/30/CSP-S%202022%20%E6%B8%B8%E8%AE%B0/">CSP-S 2022 游记</a>
          </li>
        
          <li>
            <a href="/2022/05/29/%E6%96%9C%E7%8E%87%E4%BC%98%E5%8C%96%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92%20%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/">斜率优化动态规划 学习笔记</a>
          </li>
        
          <li>
            <a href="/2022/05/22/PKUSC%E4%B8%80%E5%8F%A5%E8%AF%9D%E6%B8%B8%E8%AE%B0/">PKUSC一句话游记</a>
          </li>
        
          <li>
            <a href="/2022/05/18/%E7%9C%81%E9%80%89%E6%B8%B8%E8%AE%B0%EF%BC%9F%E7%9C%81%E9%80%89%E6%B8%B8%E5%AF%84%EF%BC%81/">省选游记？省选游寄！</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2023 John Doe<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/js/jquery-3.6.4.min.js"></script>



  
<script src="/fancybox/jquery.fancybox.min.js"></script>




<script src="/js/script.js"></script>





  </div>
</body>
</html>